<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class RDoc::Markup::ToRdoc - rdoc: Ruby Standard Library Documentation</title>


<script src="../../js/navigation.js" defer></script>
<script src="../../js/search.js" defer></script>
<script src="../../js/search_index.js" defer></script>
<script src="../../js/searcher.js" defer></script>
<script src="../../js/darkfish.js" defer></script>

<script src="../../js/jquery-3.2.0.min.js"></script>

<script src="../../js/vue.min.js"></script>
<script src="../../js/js.cookie.min.js"></script>

<link href="../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../css/rdoc.css" rel="stylesheet">
<link href="../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../";
  var index_rel_prefix = "../../";
  var darkModeCsseHref = "../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../table_of_contents.html#pages">Pages</a>
    <a href="../../table_of_contents.html#classes">Classes</a>
    <a href="../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="Formatter.html">RDoc::Markup::Formatter</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li class="calls-super" ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-accept_blank_line">#accept_blank_line</a>
    <li ><a href="#method-i-accept_block_quote">#accept_block_quote</a>
    <li ><a href="#method-i-accept_heading">#accept_heading</a>
    <li ><a href="#method-i-accept_indented_paragraph">#accept_indented_paragraph</a>
    <li ><a href="#method-i-accept_list_end">#accept_list_end</a>
    <li ><a href="#method-i-accept_list_item_end">#accept_list_item_end</a>
    <li ><a href="#method-i-accept_list_item_start">#accept_list_item_start</a>
    <li ><a href="#method-i-accept_list_start">#accept_list_start</a>
    <li ><a href="#method-i-accept_paragraph">#accept_paragraph</a>
    <li ><a href="#method-i-accept_raw">#accept_raw</a>
    <li ><a href="#method-i-accept_rule">#accept_rule</a>
    <li ><a href="#method-i-accept_table">#accept_table</a>
    <li ><a href="#method-i-accept_verbatim">#accept_verbatim</a>
    <li ><a href="#method-i-attributes">#attributes</a>
    <li ><a href="#method-i-end_accepting">#end_accepting</a>
    <li ><a href="#method-i-handle_regexp_HARD_BREAK">#handle_regexp_HARD_BREAK</a>
    <li ><a href="#method-i-handle_regexp_SUPPRESSED_CROSSREF">#handle_regexp_SUPPRESSED_CROSSREF</a>
    <li ><a href="#method-i-init_tags">#init_tags</a>
    <li ><a href="#method-i-start_accepting">#start_accepting</a>
    <li ><a href="#method-i-use_prefix">#use_prefix</a>
    <li ><a href="#method-i-wrap">#wrap</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-RDoc::Markup::ToRdoc">
    <h1 id="class-RDoc::Markup::ToRdoc" class="class">
      class RDoc::Markup::ToRdoc
    </h1>

    <section class="description">
    
<p>Outputs <a href="../../RDoc.html"><code>RDoc</code></a> markup as <a href="../../RDoc.html"><code>RDoc</code></a> markup! (mostly)</p>

    </section>

      <section id="5Buntitled-5D" class="documentation-section">



        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-indent" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">indent</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              <p>Current indent amount for output in characters</p>
              </div>
            </div>
          <div id="attribute-i-list_index" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">list_index</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Stack of current list indexes for alphabetic and numeric lists</p>
              </div>
            </div>
          <div id="attribute-i-list_type" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">list_type</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Stack of list types</p>
              </div>
            </div>
          <div id="attribute-i-list_width" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">list_width</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Stack of list widths for indentation</p>
              </div>
            </div>
          <div id="attribute-i-prefix" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">prefix</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Prefix for the next list item.  See <a href="ToRdoc.html#method-i-use_prefix"><code>use_prefix</code></a></p>
              </div>
            </div>
          <div id="attribute-i-res" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">res</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Output accumulator</p>
              </div>
            </div>
          <div id="attribute-i-width" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">width</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              <p>Output width in characters</p>
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(markup = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Creates a new formatter that will output (mostly) RDoc markup</p>
                                <div class="method-calls-super">
                                  Calls superclass method
                                  <a href="Formatter.html#method-c-new"><code>RDoc::Markup::Formatter::new</code></a>
                              </div>

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 45</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span> <span class="ruby-identifier">markup</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">super</span> <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">markup</span>

  <span class="ruby-ivar">@markup</span>.<span class="ruby-identifier">add_regexp_handling</span>(<span class="ruby-regexp">/\\\S/</span>, <span class="ruby-value">:SUPPRESSED_CROSSREF</span>)
  <span class="ruby-ivar">@width</span> = <span class="ruby-value">78</span>
  <span class="ruby-identifier">init_tags</span>

  <span class="ruby-ivar">@headings</span> = {}
  <span class="ruby-ivar">@headings</span>.<span class="ruby-identifier">default</span> = []

  <span class="ruby-ivar">@headings</span>[<span class="ruby-value">1</span>] = [<span class="ruby-string">&#39;= &#39;</span>,      <span class="ruby-string">&#39;&#39;</span>]
  <span class="ruby-ivar">@headings</span>[<span class="ruby-value">2</span>] = [<span class="ruby-string">&#39;== &#39;</span>,     <span class="ruby-string">&#39;&#39;</span>]
  <span class="ruby-ivar">@headings</span>[<span class="ruby-value">3</span>] = [<span class="ruby-string">&#39;=== &#39;</span>,    <span class="ruby-string">&#39;&#39;</span>]
  <span class="ruby-ivar">@headings</span>[<span class="ruby-value">4</span>] = [<span class="ruby-string">&#39;==== &#39;</span>,   <span class="ruby-string">&#39;&#39;</span>]
  <span class="ruby-ivar">@headings</span>[<span class="ruby-value">5</span>] = [<span class="ruby-string">&#39;===== &#39;</span>,  <span class="ruby-string">&#39;&#39;</span>]
  <span class="ruby-ivar">@headings</span>[<span class="ruby-value">6</span>] = [<span class="ruby-string">&#39;====== &#39;</span>, <span class="ruby-string">&#39;&#39;</span>]

  <span class="ruby-ivar">@hard_break</span> = <span class="ruby-string">&quot;\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-accept_blank_line" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_blank_line</span><span
                                class="method-args">(blank_line)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>blank_line</code> to the output</p>

                              <div class="method-source-code" id="accept_blank_line-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 77</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_blank_line</span> <span class="ruby-identifier">blank_line</span>
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_block_quote" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_block_quote</span><span
                                class="method-args">(block_quote)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>paragraph</code> to the output</p>

                              <div class="method-source-code" id="accept_block_quote-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 84</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_block_quote</span> <span class="ruby-identifier">block_quote</span>
  <span class="ruby-ivar">@indent</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span>

  <span class="ruby-identifier">block_quote</span>.<span class="ruby-identifier">parts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span>
    <span class="ruby-ivar">@prefix</span> = <span class="ruby-string">&#39;&gt; &#39;</span>

    <span class="ruby-identifier">part</span>.<span class="ruby-identifier">accept</span> <span class="ruby-keyword">self</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-ivar">@indent</span> <span class="ruby-operator">-=</span> <span class="ruby-value">2</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_heading" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_heading</span><span
                                class="method-args">(heading)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>heading</code> to the output</p>

                              <div class="method-source-code" id="accept_heading-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 99</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_heading</span> <span class="ruby-identifier">heading</span>
  <span class="ruby-identifier">use_prefix</span> <span class="ruby-keyword">or</span> <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@indent</span>
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@headings</span>[<span class="ruby-identifier">heading</span>.<span class="ruby-identifier">level</span>][<span class="ruby-value">0</span>]
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">attributes</span>(<span class="ruby-identifier">heading</span>.<span class="ruby-identifier">text</span>)
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@headings</span>[<span class="ruby-identifier">heading</span>.<span class="ruby-identifier">level</span>][<span class="ruby-value">1</span>]
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_indented_paragraph" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_indented_paragraph</span><span
                                class="method-args">(paragraph)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>paragraph</code> to the output</p>

                              <div class="method-source-code" id="accept_indented_paragraph-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 203</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_indented_paragraph</span> <span class="ruby-identifier">paragraph</span>
  <span class="ruby-ivar">@indent</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">paragraph</span>.<span class="ruby-identifier">indent</span>
  <span class="ruby-identifier">text</span> = <span class="ruby-identifier">paragraph</span>.<span class="ruby-identifier">text</span> <span class="ruby-ivar">@hard_break</span>
  <span class="ruby-identifier">wrap</span> <span class="ruby-identifier">attributes</span> <span class="ruby-identifier">text</span>
  <span class="ruby-ivar">@indent</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">paragraph</span>.<span class="ruby-identifier">indent</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_list_end" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_list_end</span><span
                                class="method-args">(list)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Finishes consumption of <code>list</code></p>

                              <div class="method-source-code" id="accept_list_end-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 110</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_list_end</span> <span class="ruby-identifier">list</span>
  <span class="ruby-ivar">@list_index</span>.<span class="ruby-identifier">pop</span>
  <span class="ruby-ivar">@list_type</span>.<span class="ruby-identifier">pop</span>
  <span class="ruby-ivar">@list_width</span>.<span class="ruby-identifier">pop</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_list_item_end" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_list_item_end</span><span
                                class="method-args">(list_item)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Finishes consumption of <code>list_item</code></p>

                              <div class="method-source-code" id="accept_list_item_end-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 119</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_list_item_end</span> <span class="ruby-identifier">list_item</span>
  <span class="ruby-identifier">width</span> = <span class="ruby-keyword">case</span> <span class="ruby-ivar">@list_type</span>.<span class="ruby-identifier">last</span>
          <span class="ruby-keyword">when</span> <span class="ruby-value">:BULLET</span> <span class="ruby-keyword">then</span>
            <span class="ruby-value">2</span>
          <span class="ruby-keyword">when</span> <span class="ruby-value">:NOTE</span>, <span class="ruby-value">:LABEL</span> <span class="ruby-keyword">then</span>
            <span class="ruby-keyword">if</span> <span class="ruby-ivar">@prefix</span> <span class="ruby-keyword">then</span>
              <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@prefix</span>.<span class="ruby-identifier">strip</span>
              <span class="ruby-ivar">@prefix</span> = <span class="ruby-keyword">nil</span>
            <span class="ruby-keyword">end</span>

            <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
            <span class="ruby-value">2</span>
          <span class="ruby-keyword">else</span>
            <span class="ruby-identifier">bullet</span> = <span class="ruby-ivar">@list_index</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">to_s</span>
            <span class="ruby-ivar">@list_index</span>[<span class="ruby-value">-1</span>] = <span class="ruby-ivar">@list_index</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">succ</span>
            <span class="ruby-identifier">bullet</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-value">2</span>
          <span class="ruby-keyword">end</span>

  <span class="ruby-ivar">@indent</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">width</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_list_item_start" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_list_item_start</span><span
                                class="method-args">(list_item)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Prepares the visitor for consuming <code>list_item</code></p>

                              <div class="method-source-code" id="accept_list_item_start-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 143</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_list_item_start</span> <span class="ruby-identifier">list_item</span>
  <span class="ruby-identifier">type</span> = <span class="ruby-ivar">@list_type</span>.<span class="ruby-identifier">last</span>

  <span class="ruby-keyword">case</span> <span class="ruby-identifier">type</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:NOTE</span>, <span class="ruby-value">:LABEL</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">bullets</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">list_item</span>.<span class="ruby-identifier">label</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">label</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">attributes</span>(<span class="ruby-identifier">label</span>).<span class="ruby-identifier">strip</span>
    <span class="ruby-keyword">end</span>.<span class="ruby-identifier">join</span> <span class="ruby-string">&quot;\n&quot;</span>

    <span class="ruby-identifier">bullets</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;:\n&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">bullets</span>.<span class="ruby-identifier">empty?</span>

    <span class="ruby-ivar">@prefix</span> = <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@indent</span>
    <span class="ruby-ivar">@indent</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span>
    <span class="ruby-ivar">@prefix</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">bullets</span> <span class="ruby-operator">+</span> (<span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@indent</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">bullet</span> = <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:BULLET</span> <span class="ruby-operator">?</span> <span class="ruby-string">&#39;*&#39;</span> <span class="ruby-operator">:</span>  <span class="ruby-ivar">@list_index</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39;.&#39;</span>
    <span class="ruby-ivar">@prefix</span> = (<span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@indent</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">bullet</span>.<span class="ruby-identifier">ljust</span>(<span class="ruby-identifier">bullet</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
    <span class="ruby-identifier">width</span> = <span class="ruby-identifier">bullet</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
    <span class="ruby-ivar">@indent</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">width</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_list_start" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_list_start</span><span
                                class="method-args">(list)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Prepares the visitor for consuming <code>list</code></p>

                              <div class="method-source-code" id="accept_list_start-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 168</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_list_start</span> <span class="ruby-identifier">list</span>
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">type</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:BULLET</span> <span class="ruby-keyword">then</span>
    <span class="ruby-ivar">@list_index</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword">nil</span>
    <span class="ruby-ivar">@list_width</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">1</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:LABEL</span>, <span class="ruby-value">:NOTE</span> <span class="ruby-keyword">then</span>
    <span class="ruby-ivar">@list_index</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword">nil</span>
    <span class="ruby-ivar">@list_width</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">2</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:LALPHA</span> <span class="ruby-keyword">then</span>
    <span class="ruby-ivar">@list_index</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39;a&#39;</span>
    <span class="ruby-ivar">@list_width</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:NUMBER</span> <span class="ruby-keyword">then</span>
    <span class="ruby-ivar">@list_index</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">1</span>
    <span class="ruby-ivar">@list_width</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:UALPHA</span> <span class="ruby-keyword">then</span>
    <span class="ruby-ivar">@list_index</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39;A&#39;</span>
    <span class="ruby-ivar">@list_width</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">items</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>, <span class="ruby-node">&quot;invalid list type #{list.type}&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-ivar">@list_type</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">type</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_paragraph" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_paragraph</span><span
                                class="method-args">(paragraph)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>paragraph</code> to the output</p>

                              <div class="method-source-code" id="accept_paragraph-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 195</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_paragraph</span> <span class="ruby-identifier">paragraph</span>
  <span class="ruby-identifier">text</span> = <span class="ruby-identifier">paragraph</span>.<span class="ruby-identifier">text</span> <span class="ruby-ivar">@hard_break</span>
  <span class="ruby-identifier">wrap</span> <span class="ruby-identifier">attributes</span> <span class="ruby-identifier">text</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_raw" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_raw</span><span
                                class="method-args">(raw)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>raw</code> to the output</p>

                              <div class="method-source-code" id="accept_raw-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 213</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_raw</span> <span class="ruby-identifier">raw</span>
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">raw</span>.<span class="ruby-identifier">parts</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;\n&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_rule" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_rule</span><span
                                class="method-args">(rule)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>rule</code> to the output</p>

                              <div class="method-source-code" id="accept_rule-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 220</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_rule</span> <span class="ruby-identifier">rule</span>
  <span class="ruby-identifier">use_prefix</span> <span class="ruby-keyword">or</span> <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@indent</span>
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39;-&#39;</span> <span class="ruby-operator">*</span> (<span class="ruby-ivar">@width</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@indent</span>)
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_table" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_table</span><span
                                class="method-args">(header, body, aligns)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>table</code> to the output</p>

                              <div class="method-source-code" id="accept_table-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 243</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_table</span> <span class="ruby-identifier">header</span>, <span class="ruby-identifier">body</span>, <span class="ruby-identifier">aligns</span>
  <span class="ruby-identifier">widths</span> = <span class="ruby-identifier">header</span>.<span class="ruby-identifier">zip</span>(<span class="ruby-identifier">body</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">|</span>
    [<span class="ruby-identifier">h</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">max</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">aligns</span> = <span class="ruby-identifier">aligns</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">a</span>
    <span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span>
      <span class="ruby-value">:center</span>
    <span class="ruby-keyword">when</span> <span class="ruby-value">:left</span>
      <span class="ruby-value">:ljust</span>
    <span class="ruby-keyword">when</span> <span class="ruby-value">:right</span>
      <span class="ruby-value">:rjust</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">header</span>.<span class="ruby-identifier">zip</span>(<span class="ruby-identifier">widths</span>, <span class="ruby-identifier">aligns</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-identifier">w</span>, <span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">h</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">w</span>)
  <span class="ruby-keyword">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;|&quot;</span>).<span class="ruby-identifier">rstrip</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">widths</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">w</span><span class="ruby-operator">|</span> <span class="ruby-string">&quot;-&quot;</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">w</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;|&quot;</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
  <span class="ruby-identifier">body</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
    <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">zip</span>(<span class="ruby-identifier">widths</span>, <span class="ruby-identifier">aligns</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span>, <span class="ruby-identifier">w</span>, <span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">t</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">w</span>)
    <span class="ruby-keyword">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;|&quot;</span>).<span class="ruby-identifier">rstrip</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-accept_verbatim" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">accept_verbatim</span><span
                                class="method-args">(verbatim)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Outputs <code>verbatim</code> indented 2 columns</p>

                              <div class="method-source-code" id="accept_verbatim-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 229</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">accept_verbatim</span> <span class="ruby-identifier">verbatim</span>
  <span class="ruby-identifier">indent</span> = <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">*</span> (<span class="ruby-ivar">@indent</span> <span class="ruby-operator">+</span> <span class="ruby-value">2</span>)

  <span class="ruby-identifier">verbatim</span>.<span class="ruby-identifier">parts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span>
    <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">indent</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">part</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;\n&quot;</span>
    <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">part</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-attributes" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">attributes</span><span
                                class="method-args">(text)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Applies attribute-specific markup to <code>text</code> using RDoc::AttributeManager</p>

                              <div class="method-source-code" id="attributes-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 271</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">attributes</span> <span class="ruby-identifier">text</span>
  <span class="ruby-identifier">flow</span> = <span class="ruby-ivar">@am</span>.<span class="ruby-identifier">flow</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">convert_flow</span> <span class="ruby-identifier">flow</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-end_accepting" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">end_accepting</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the generated output</p>

                              <div class="method-source-code" id="end_accepting-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 279</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">end_accepting</span>
  <span class="ruby-ivar">@res</span>.<span class="ruby-identifier">join</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-handle_regexp_HARD_BREAK" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">handle_regexp_HARD_BREAK</span><span
                                class="method-args">(target)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds a newline to the output</p>

                              <div class="method-source-code" id="handle_regexp_HARD_BREAK-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 295</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">handle_regexp_HARD_BREAK</span> <span class="ruby-identifier">target</span>
  <span class="ruby-string">&quot;\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-handle_regexp_SUPPRESSED_CROSSREF" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">handle_regexp_SUPPRESSED_CROSSREF</span><span
                                class="method-args">(target)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Removes preceding \ from the suppressed crossref <code>target</code></p>

                              <div class="method-source-code" id="handle_regexp_SUPPRESSED_CROSSREF-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 286</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">handle_regexp_SUPPRESSED_CROSSREF</span> <span class="ruby-identifier">target</span>
  <span class="ruby-identifier">text</span> = <span class="ruby-identifier">target</span>.<span class="ruby-identifier">text</span>
  <span class="ruby-identifier">text</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-string">&#39;\\&#39;</span>, <span class="ruby-string">&#39;&#39;</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">in_tt?</span>
  <span class="ruby-identifier">text</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-init_tags" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">init_tags</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Maps attributes to HTML sequences</p>

                              <div class="method-source-code" id="init_tags-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 68</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">init_tags</span>
  <span class="ruby-identifier">add_tag</span> <span class="ruby-value">:BOLD</span>, <span class="ruby-string">&quot;&lt;b&gt;&quot;</span>, <span class="ruby-string">&quot;&lt;/b&gt;&quot;</span>
  <span class="ruby-identifier">add_tag</span> <span class="ruby-value">:TT</span>,   <span class="ruby-string">&quot;&lt;tt&gt;&quot;</span>, <span class="ruby-string">&quot;&lt;/tt&gt;&quot;</span>
  <span class="ruby-identifier">add_tag</span> <span class="ruby-value">:EM</span>,   <span class="ruby-string">&quot;&lt;em&gt;&quot;</span>, <span class="ruby-string">&quot;&lt;/em&gt;&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-start_accepting" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">start_accepting</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Prepares the visitor for text generation</p>

                              <div class="method-source-code" id="start_accepting-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 302</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">start_accepting</span>
  <span class="ruby-ivar">@res</span> = [<span class="ruby-string">&quot;&quot;</span>]
  <span class="ruby-ivar">@indent</span> = <span class="ruby-value">0</span>
  <span class="ruby-ivar">@prefix</span> = <span class="ruby-keyword">nil</span>

  <span class="ruby-ivar">@list_index</span> = []
  <span class="ruby-ivar">@list_type</span>  = []
  <span class="ruby-ivar">@list_width</span> = []
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-use_prefix" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">use_prefix</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds the stored <a href="ToRdoc.html#attribute-i-prefix"><code>prefix</code></a> to the output and clears it.  Lists generate a prefix for later consumption.</p>

                              <div class="method-source-code" id="use_prefix-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 316</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">use_prefix</span>
  <span class="ruby-identifier">prefix</span>, <span class="ruby-ivar">@prefix</span> = <span class="ruby-ivar">@prefix</span>, <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">prefix</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">prefix</span>

  <span class="ruby-identifier">prefix</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-wrap" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">wrap</span><span
                                class="method-args">(text)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Wraps <code>text</code> to <a href="ToRdoc.html#attribute-i-width"><code>width</code></a></p>

                              <div class="method-source-code" id="wrap-source">
            <pre><span class="ruby-comment"># File rdoc/markup/to_rdoc.rb, line 326</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">wrap</span> <span class="ruby-identifier">text</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">text</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>

  <span class="ruby-identifier">text_len</span> = <span class="ruby-ivar">@width</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@indent</span>

  <span class="ruby-identifier">text_len</span> = <span class="ruby-value">20</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">text_len</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">20</span>

  <span class="ruby-identifier">next_prefix</span> = <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@indent</span>

  <span class="ruby-identifier">prefix</span> = <span class="ruby-ivar">@prefix</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">next_prefix</span>
  <span class="ruby-ivar">@prefix</span> = <span class="ruby-keyword">nil</span>

  <span class="ruby-identifier">text</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp">/\G(?:([^ \n]{#{text_len}})(?=[^ \n])|(.{1,#{text_len}})(?:[ \n]|\z))/</span>) <span class="ruby-keyword">do</span>
    <span class="ruby-ivar">@res</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">prefix</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-node">$1</span> <span class="ruby-operator">||</span> <span class="ruby-node">$2</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
    <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">next_prefix</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

